package net.penguinmenac3.math;

import net.penguinmenac3.math.rings.ComplexNumber;
import net.penguinmenac3.math.rings.RealNumber;
import net.penguinmenac3.math.rings.VariableNumber;

/**
 * Used to test the functionality with a simple example.
 * 
 * @author Michael
 */
public class Test {
	public static void main(String[] args) {
		RealNumber[][] m = {
				{ new RealNumber(-1), new RealNumber(-2), new RealNumber(3) },
				{ new RealNumber(1), new RealNumber(-1), new RealNumber(0) },
				{ new RealNumber(0), new RealNumber(1), new RealNumber(-1) } };
		Matrix matrix = new Matrix(m);
		Gausian g = new Gausian(matrix);

		long start = System.nanoTime();
		matrix = g.solve(2, false);
		long time = (System.nanoTime() - start);
		System.out.println("Solution ("+String.format("%.2f", time/1000000.0)+"ms)");
		System.out.println(matrix.toString());
	}
}
